package com.example.dao;

import com.example.entity.User;

import java.sql.Connection;
import java.sql.SQLException;

public interface UserDao {

    /* 通过用户名和密码查询用户 */
    User getLoginUser(Connection connection, User user) throws SQLException;

    /* 通过用户名查询用户是否存在 */
    boolean getUserByUsername(Connection connection, String username)
            throws SQLException;

    /* 新增一个用户 */
    int insertUser(Connection connection, User user) throws SQLException;
}
